1. Field of the Invention
The present invention relates to a signal processor capable of providing stable processing, for each macroblock, of video data compressed by variable-length coding.
2. Description of the Related Art
In recent years, so-called MPEG (Moving Picture Experts Group) encoding has been widely used as a compression algorithm for digital video signals. MPEG-2 is a motion picture compression standard using the DCT (Discrete Cosine Transform) and predictive coding. MPEG-2 encoding involves: breaking picture data of one frame into macroblocks having a predetermined size, each macroblock being predictive coded using a motion vector; and further breaking each macroblock into DCT blocks, each DCT block being subjected to the DCT for variable-length coding. MPEG-2 which was developed to provide higher extensibility and higher picture quality is the dominant standard in the state of the art.
Generally, MPEG-2 data is formed of a data stream having a hierarchical structure. The hierarchical structure is composed of a sequence layer, a GOP (Group Of Pictures) layer, a picture layer, a slice layer, and a macroblock layer in the stated order from the top, each layer containing one or more sublayers. Each layer contains a header section. The layers except for the macroblock layer have start codes arranged before the header sections.
The macroblock is a block having 16×16 pixels, and one or more macroblocks form one slice. One picture corresponds to one screen, and a slice is not permitted to extend over pictures. It is required that a slice header always reside at the left end of the screen. The slice start code contains vertical position information of the slice in question, and the slice header stores information such as extended slice vertical position information or quantizer scale information.
In MPEG-2, three picture types are defined. B (bi-directionally) pictures and P (predictive) pictures are predictive-coded in a time series manner, and I (intra) pictures are completed within one screen (one frame). P-picture requires the temporally earlier picture, and B-picture requires the temporally earlier and later pictures. It is preferable to use only I-pictures in order to achieve editing for each frame.
FIGS. 32A to 32C illustrate exemplary macroblock addresses according to the 625/50 standard. FIG. 32A shows an exemplary array of macroblocks on a screen. One screen is broken into 38 rows×45 columns of macroblocks. Coordinates (yy,xx) in the blocks shown in FIG. 32A represent addresses of the macroblocks, in which the location of the blocks on the screen is defined as coordinates (vertical position, horizontal position). In the above-described MPEG stream which is formed of I-pictures, the macroblocks must be orderly and fully transmitted.
More specifically, if macroblocks are arranged on one screen in the manner shown in FIG. 32A, in the data stream in which I-pictures are transmitted, it is expected that, for example, shaded macroblocks shown in FIG. 32A are transmitted in the order of (2,41), (2,42), (2,43), (2,44), (3,0), (3,1), (3,2), and (3,3), as shown in FIG. 32B, by way of example.
If a portion of the macroblocks, for example, (2,43), is missing during transmission etc. for some reason, the data stream in which macroblock (2,42) is followed by macroblock (2,44), as shown in FIG. 32C, is irregular in which the macroblock addresses are discontinuous. Such an irregular stream introduces MPEG syntax errors which do not conform to the MPEG standard.
A portion of macroblocks is missing possibly because failure occurs in the transmission path, namely, bit inversion occurs or the data stream is interrupted on the transmission path etc. An irregular data stream originally containing a discontinuous macroblock address may also result in missing a macroblock.
Once such an irregular data stream is input to an MPEG decoder, the MPEG decoder may entail a risk of hang-up because an unpredictable macroblock address has been input. Conventionally, it is thus difficult to achieve a stable system.